<!-- <p>table works!</p> -->
<div nz-row>
  <div nz-col nzSpan="12" class="table-container">
    <nz-card nzHoverable class="table-card" [nzCover]="table1Cover">
      <nz-card-meta nzTitle="Table 1" nzDescription="">
      </nz-card-meta>
      <button (click)="exportExcel()">导出</button>
    </nz-card>
    <ng-template #table1Cover>
      <nz-table #basicTable 
        id="basic-table-1"
        class="table-card-content"
        [nzShowPagination]="false"
        [nzScroll]="{ y: '400px' }"
        [nzData]="table1.items">
        <thead>
          <tr>
            <th *ngFor="let item of table1.heads">{{ item.title }}</th>
          </tr>
        </thead>
        <tbody>
          <tr *ngFor="let data of basicTable.data">
            <td>{{ data.id }}</td>
            <td>{{ data.name }}</td>
            <td>{{ data.address }}</td>
            <td>{{ data.alias }}</td>
      
          </tr>
        </tbody>
      </nz-table>  
    </ng-template>
  </div>
  <div nz-col nzSpan="12" class="table-container">
    <nz-card nzHoverable class="table-card" [nzCover]="table2Cover">
      <nz-card-meta nzTitle="Table 2" nzDescription="">
      </nz-card-meta>
    </nz-card>
    <ng-template #table2Cover>
      <nz-table #basicTable
        class="table-card-content"
        [nzScroll]="{ y: '400px' }"
        [nzShowPagination]="false"
        [nzData]="table2.items">
        <thead>
          <tr>
            <th *ngFor="let item of table2.heads">{{ item.title }}</th>
          </tr>          
        </thead>
        <tbody>
          <tr *ngFor="let data of basicTable.data">
            <td>{{ data.name }}</td>
            <td>{{ data.address }}</td>
            <td>{{ data.lastLogin }}</td>
          </tr>
        </tbody>
      </nz-table>  
    </ng-template>
  </div>
</div>
